<template>
  <div class="box">
    <div class="boxLogin">
      <div class="chanes">
        <img src="../../assets/img/cn.png" />
      </div>
      <div class="logo">
        <img src="../../assets/img/logo.png" />
      </div>
      <div class="userPass">
        <el-form
          :model="ruleForm"
          status-icon
          :rules="rules"
          ref="ruleForm"
          label-width="40px"
          class="demo-ruleForm"
          :label-position="top"
        >
          <el-form-item label="账号" prop="age">
            <el-input
              v-model.number="ruleForm.age"
              :style="{ width: '280px' }"
            ></el-input>
          </el-form-item>
          <el-form-item label="密码" prop="pass">
            <el-input
              type="password"
              v-model="ruleForm.pass"
              autocomplete="off"
              :style="{ width: '280px' }"
            ></el-input>
          </el-form-item>
          <!-- 忘记密码 -->
          <div class="pass">
            <span><router-link to="">忘记密码？</router-link></span>
          </div>
          <!-- 滑块 -->
          <div class="slider">
            <span class="sliderTxt">滑动验证:</span>
            <slider status="status"></slider>
          </div>
          <el-button
            type="primary"
            @click="submitForm('ruleForm')"
            :style="{
              width: '320px',
              height: '40px',
              marginTop: '10px',
              fontSize: '16px',
            }"
            >登录</el-button
          >
        </el-form>
        <el-row>
          <el-button
            type="primary"
            plain
            :style="{ width: '320px', marginTop: '20px', height: '40px' }"
            >注册SenseCAP云平台账号</el-button
          >
        </el-row>
      </div>
    </div>
    <div class="foolter">
      <div class="fool floterImg">
        <img src="../../assets/img/seeed.png" />
      </div>
      <div class="fool copy">
        <span>©2008-2021 深圳矽递科技股份有限公司所有</span>
        <span>粤|CP备13058720号</span>
      </div>
      <div class="fool Privacy">隐私政策</div>
      <div class="fool floterImg2">
        <img src="../../assets/img/mcafee.png" />
      </div>
      <div class="fool">
        <el-select v-model="value" placeholder="中国站" size="small">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
    </div>
  </div>
</template>

<script>
// 引入滑块组件
import Slider from "@/components/Slider.vue";
export default {
  name: "login",
  components: {
    Slider,
  },
  data() {
    return {
      ruleForm: {},
      status: false,
      options: [
        {
          value: "选项1",
          label: "中国站",
        },
        {
          value: "选项2",
          label: "英国站",
        }
      ],
      value: '',
    };
  },
  methods: {
    submitForm() {
      console.log("登录了1");
    },
  },
};
</script>

<style scoped lang="scss">
.box {
  width: 100%;
  height: 100vh;
  background: #e8e8e8;
  .boxLogin {
    background: #fff;
    width: 400px;
    height: 470px;
    border: 1px solid #e8e8e8;
    margin: 0 auto;
    position: relative;
    top: 10%;
    .chanes {
      width: 50px;
      height: 50px;
      float: right;
      img {
        width: 100%;
      }
    }
    .logo {
      width: 100%;
      height: 60px;
      display: flex;
      justify-content: space-around;
      align-items: center;
      img {
        width: 180px;
      }
    }
    .userPass {
      margin-top: 20px;
      display: flex;
      justify-content: space-around;
      flex-direction: column;
      align-items: center;
      .pass{
        width:80px;
        height:30px;
        font-size: 14px;
        margin-top:-20px;
        margin-left:40px;
        a{
          color:#222;
        }
      }
      .slider {
        width: 320px;
        height: 70px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        .sliderTxt {
          font-weight: 700;
        }
      }
    }
  }
  .foolter {
    width: 100%;
    height: 60px;
    background: #fff;
    position: fixed;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .fool {
      margin-left: 50px;
    }
    .floterImg {
      width: 120px;
      img {
        width: 100%;
      }
    }
    .floterImg2 {
      width: 70px;
      img {
        width: 100%;
      }
    }
    .copy {
      display: flex;
      flex-direction: column;
      font-size: 13px;
    }
    .Privacy {
      display: flex;
      flex-direction: row;
      width: 60px;
      font-size: 13px;
    }
  }
}
</style>